﻿<%@ Page Title="" ValidateRequest="false" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="Edit.aspx.cs" Inherits="EWebsite.Admin.Products.Edit" Debug="true" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"> 
    <style type="text/css">

        .style4
        {
            width: 100%;
        }
        .style5
        {
            width: 60px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="left-col">
        <div class="item">
            <span class="title">Name</span>
            <asp:TextBox ID="txtName" runat="server" Height="30px" Width="700px"></asp:TextBox>
            <asp:HiddenField ID="hdID" runat="server" />
        </div>
        <div class="item">
            <span class="title">Description</span>
            <asp:TextBox ID="txtDescription" runat="server" TextMode="MultiLine" 
                Height="100px" Width="700px"></asp:TextBox>
        </div>
        <div class="item">
            <span class="title">Other info</span>
                <asp:TextBox ID="txtOtherInfo" name="txtOtherInfo" runat="server" 
                    TextMode="MultiLine" CssClass="mceEditor"></asp:TextBox>
        </div>
    </div>    
    <div id="right-col">
        <div class="item">
            
                <asp:Button ID="btnSave" runat="server" Text="Save" onclick="btnSave_Click" />
            
        </div>
        <div class="item">
            <span class="title">Category</span>
                <select name="categoryTree">
                    <% for (int i = 0; i < TblCategories.Rows.Count; i++) { %>
                        <% if (TblProduct.Rows[0]["CatID"].ToString() != TblCategories.Rows[i]["CatID"].ToString()) {  %>
                        <option value="<%= TblCategories.Rows[i]["CatID"] %>"><%= TblCategories.Rows[i]["CatName"]%></option>
                        <% }
                           else { %>
                           <option value="<%= TblCategories.Rows[i]["CatID"] %>" selected="selected"><%= TblCategories.Rows[i]["CatName"]%></option>
                        <% } %>
                    <% } %>
                </select></div>
        <div class="item">
            <span class="title">Image</span><br />
            <asp:Image ID="imgProduct" runat="server" CssClass="img-edit" /><br />
            <asp:FileUpload ID="fuImage" runat="server" />
        </div>
        <div class="item">
            <span class="title">Price</span>
            <asp:TextBox ID="txtPrice" runat="server"></asp:TextBox>
        </div>
        <div class="item">
            <span class="title">Quantity At Least</span>
            <asp:TextBox ID="txtQuantityAtLeast" runat="server"></asp:TextBox>               
        </div>
        <div class="item">
            <span class="title">In stock</span><asp:TextBox ID="txtInstock" runat="server"></asp:TextBox>
        </div>
        <div class="item">
            <span class="title">Parameter</span>
            <table class="style4">
                <tr>
                    <td class="style5">
                        Length</td>
                    <td>
                <asp:TextBox ID="txtLength" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="style5">
                        Width</td>
                    <td>
                <asp:TextBox ID="txtWidth" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="style5">
                        Height</td>
                    <td>
                <asp:TextBox ID="txtHeight" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="style5">
                        Weight</td>
                    <td>
                <asp:TextBox ID="txtWeight" runat="server"></asp:TextBox>
                    </td>
                </tr>
            </table>
        </div>
    </div><!--#right-col-->
    </p>
    </span>
</asp:Content>
